<?php

$templateData = array(
    'title'             => $this->title,
    'resourceUri'       => $this->resourceUri,
    'description'       => $this->description,
    'descriptionHelper' => $this->descriptionHelper,
    'options'           => $this->options
);

$languages = array(
    'de' => 'German', 
    'en' => 'English', 
    'nl' => 'Dutch'
);

$renderData = array();

if (isset($this->description['http://lod2.eu/schema/date'][0]['value'])) {
    $date = strtotime($this->description['http://lod2.eu/schema/date'][0]['value']);
    $renderData['Date'] = date('j F Y', $date);
}

if (isset($this->description['http://lod2.eu/schema/lang'][0]['value'])) {
    $lang = $this->description['http://lod2.eu/schema/lang'][0]['value'];
    $renderData['Language'] = $languages[$lang];
}

if (isset($this->description['http://lod2.eu/schema/publishedBy'][0]['value'])) {
    $publisher = $this->description['http://lod2.eu/schema/publishedBy'][0]['value'];
    $renderData['Publisher'] = $publisher;
}

if (isset($this->description['http://www.w3.org/2000/01/rdf-schema#seeAlso'][0]['value'])) {
    $link = $this->description['http://www.w3.org/2000/01/rdf-schema#seeAlso'][0]['value'];
    $renderData['Link'] = '<a href="' . $link . '">View clipping</a>';
}

?>
<div class="maincontent">
    <div class="section pressclipping">
        <h3><?php echo $this->title ?></h3>
        <div class="section-content">
            <?php foreach ($renderData as $name => $item): ?>
                <div><?php echo $name; ?>: <?php echo $item; ?></div>
            <?php endforeach; ?>
        </div>
    </div>
</div>